<%-- 
    Document   : cambiaPassword
    Created on : 4-apr-2014, 16.33.03
    Author     : Marco
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <title>SportingEventClub</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>        
        <link rel="stylesheet" type="text/css" href="CSS/BaseSite.css" />
        <link rel="stylesheet" type="text/css" href="CSS/vertical-ticker.css"/>
        <script type="text/javascript" src="JQuery/jquery.totemticker.js"></script>
        <link rel="shortcut icon" href= "Images/stadion-icon.png"/>
    </head>
    <body>
        <div class="main">
            <div class="page">
                <div class="header">       
                    <div class="login">
                        <%@include file="login.jsp"%>
                    </div>
                    <div class="banner">
                    </div>
                    <div class="topmenu">
                        <%@include file="topmenu.jsp" %>
                    </div>
                </div>
                <div class="content">
                    <div class="content-in">
                        <div class="left-panel">
                            <div class="left-panel-in">
                                <%session = request.getSession();
                                    if(session.getAttribute("nomeUtente")==null){%>
                                        <%@include file="erroresession.jsp"%>
                                <%}else{%> 
                                  <%if(request.getAttribute("risultato")==null){%>
                                        <form name="cambiaPwd" class="cambiaPwd" method="post" action="GeneralController">
                                            Nuova Password: <input type="password" name="nuovapwd" id="nuovapwd"/><br/>
                                            Conferma nuova Password: <input type="password" name="nuovapwdconf" id="nuovapwdconf"/><br/>
                                            <button type="submit" name="submit" class="button" value="CambiaPwd">Cambia Password</button>     
                                        </form>
                                  <%}else if(request.getAttribute("risultato").equals(true)){%>
                                    <h1>Password modificata correttamente</h1>
                                    <h2><a href='homepage.jsp'>Torna alla home</a></h2>
                                  <%}else{%>
                                    <h1>Errore query</h1>
                                    <h2><a href='cambiaPassword.jsp'>Riprova</a></h2>
                                  <%}%>
                                <%}%>
                            </div>
                        </div>
                        <div class="right-panel">
                            <div class="right-panel-in">
                                <jsp:include page="/GeneralController">
                                    <jsp:param name="submit" value="right-content"/>
                                    <jsp:param name="op" value="newsbox"/>
                                </jsp:include>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="footer">
                    <%@include file="footer.jsp" %> 
                </div>
            </div>
        </div> 
    </body>
</html>
